<?php
/**
 * Created by PhpStorm.
 * User: ChengChaogui
 * Date: 2016/11/29
 * Time: 16:55
 */

namespace App\Framework\Model;


class PagingInfo
{
    //当前页码
    public $curPage;
    //数据总条数
    public $total;
    //页数
    public $pageCount;
    //每页显示的条数
    public $pageSize;

    public function __construct($curPage, $total, $pageSize)
    {
        $this->curPage = $curPage;
        $this->total = $total;
        $this->pageSize = $pageSize;
    }

    public function links()
    {
        $page = '<ul class="pagination">';

        $this->pageCount = ceil($this->total/$this->pageSize);
        if($this->curPage<=1){
            $page.='<li class="paginate_button previous disabled"><a href="javascript:void(0);">上一页</a></li>';
        }else{
            $page.='<li class="paginate_button previous disabled"><a href="javascript:void(0);">上一页</a></li>';
        }



    }
}